<!DOCTYPE HTML>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">

    <title>Save Employee</title>
</head>

<body>

    <div class="container">

        <h3>Employee Directory</h3>
        <hr>

        <p class="h4 mb-4">Save Employee</p>

        <form action="#" th:action="@{/employees/save}"
                         th:object="${employee}" method="POST">

            <input type="text" th:field="*{firstName}"
                   class="form-control mb-4 w-25" placeholder="First name">

            <input type="text" th:field="*{lastName}"
                   class="form-control mb-4 w-25" placeholder="Last name">

            <input type="text" th:field="*{email}"
                   class="form-control mb-4 w-25" placeholder="Email">

            <button type="submit" class="btn btn-info col-2">Save</button>

        </form>

        <hr>
        <a th:href="@{/employees/list}">Back to Employees List</a>

    </div>


</body>

</html>







